package com.dy.nygl.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.dy.nygl.mapper.BuildingMapper;
import com.dy.nygl.pojo.Building;
import com.dy.nygl.service.BuildingService;

@Service("buildingService")
public class BuildingServiceImpl implements BuildingService{
	
	@Resource(name="buildingDAO")
	private BuildingMapper buildingDAO;
	
	public List<Building> getBuilding(int regionId) {
		List<Building> list = buildingDAO.getBuilding(regionId);
		if(list.size()>0) {
			return list;
		}
		return null;
	}
	
	public Building getBuildingById(int id) {
		Building build = buildingDAO.getBuildingById(id);
		if(build != null) {
			return build;
		}
		return null;
	}

}
